import request from "../";

/**
 *
 * @param {Object} opt
 */
export const getJsonData = (opt) => {
  return request({
    url: opt.url,
    headers: {
      // showLoading: !1
    }
  });
};

/**
 * 获取公钥
 */
export const getPublicKey = (val) => {
  let params = { userName: val };
  return request({
    url: "/userLogin/getPublicKey",
    method: "GET",
    params
  });
};

/**
 * @author 张维金
 * @date 2024-01-04 星期四
 * @function 获取用户所填项目列表
 * @param {}
 * @return {}
 */
export const getDailyProjectByUserId = (obj) => {
  return request({
    url: "/get-daily-project-by-userid",
    params: obj
  });
};

export const saveDaily = (obj) => {
  return request({
    url: "/save-daily",
    method: "POST",
    data: obj
  });
};
